import Wolve from "./Wolve"
import player_Control from "../rabbit/player_Control"
import gameScene3 from "../Game/gameScene3"
export default class ontrigger extends Laya.Script {
    
    constructor() { super();}
    private gameover_panel:Laya.Sprite
    
    onEnable(): void {
        this.gameover_panel = this.owner.parent.getChildByName("gameover_panel")as Laya.Sprite
    }

    onTriggerEnter(other, self){
            if(other.label == "player1" || other.label == "player2" ){
                console.log(111111111)
                this.gameover_panel.visible = true
                player_Control._intance.enabled = false
                Wolve._intance.isgameover = false
                gameScene3._intance.num = 0
                // this.owner.removeSelf()
            }
        }

    onDisable(): void {
    }
}